'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  // router.get('/', controller.home.index);
  //模板 
  // router.get('/api/findschool', controller.school.index);//查找
  // router.get('/api/school/:id', controller.school.show);//查找
  // router.post('/api/addschool', controller.school.create)//增加
  // router.delete('/api/delschool/:id', controller.school.destroy);//删除
  // router.put('/api/xgschool/:id', controller.school.update); //更新

  // 登录
  router.post('/api/DLQlogin', controller.dlqlogin.login)
  // 获取用户信息
  router.get('/api/DLQgetUserInfo', controller.dlqlogin.getUserInfo)
  // 注册
  router.post('/api/DLQregisterlogin', controller.dlqlogin.register);
  // 获取订单
  router.get('/api/DLQgetOrders', controller.dlqcenter.indexOrder)
  // 获取我的商品
  router.get('/api/DLQgetMygoods', controller.dlqcenter.indexMygoods)
  // 获取我的帖子
  router.get('/api/DLQgetInvitation', controller.dlqcenter.indexMyinvitation)
  // 获取粉丝列表
  router.get('/api/DLQgetFans', controller.dlqcenter.indexFans)
  // 更新关注
  router.put('/api/DLQupdateFans', controller.dlqcenter.updateFans)
  // 获取自动回复
  router.get('/api/DLQgetAutoreply', controller.dlqcenter.indexAutoreply)
  // 更新自动回复选择
  router.put('/api/DLQupdateReplyChange', controller.dlqcenter.updateReplyChange)
  // 更新自动回复内容
  router.put('/api/DLQupdateReply', controller.dlqcenter.updateReply)
  // 修改密码
  router.put('/api/DLQupdatePassword', controller.dlqcenter.updatePassword)
  // 换绑手机
  router.put('/api/DLQupdatePhone', controller.dlqcenter.updatePhone)
  // 查看他人主页
  router.get('/api/DLQgetOther/:id', controller.dlqcenter.showOther)

  // router.get('/', controller.home.index);
  router.post('/api/sjtupload', controller.sjtupload.updateLogo) //模板 
  router.post('/api/sjtfabu', controller.sjtfabu.createfabu)
  router.post('/api/sjtfabu1', controller.sjtfabu.createfabu1)

  //广场
  router.get('/api/zxhtaohuo', controller.zxhtaohuo.index);
  router.get('/api/zxhshop', controller.zxhshop.index);
  router.get('/api/zxhliuyan', controller.zxhliuyan.index);
  router.get('/api/zxhhuati', controller.zxhhuati.index);

  router.get('/api/Lwjmethod', controller.lwjmethod.lwjmethod);// 查找
  router.get('/api/lwjsearch', controller.lwjmethod.lwjsearch);// 查找
  router.get('/api/lwjhome', controller.lwjmethod.lwjhome);// 查找
  router.post('/api/Lwjpost', controller.lwjmethod.lwjpost);// 增加
  router.delete('/api/destroy/:id', controller.lwjmethod.destroy);// 删除
  router.put('/api/lwjupdate/:id', controller.lwjmethod.lwjupdate); // 更新

  router.get('/api/home', controller.home.index);
  router.put('/api/home/:id', controller.home.update); // 更新
};
